﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using HundredMilesSoftware.UltraID3Lib;

namespace ID3_tags
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void browseBtn_Click(object sender, EventArgs e)
        {
            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                UltraID3 id3 = new UltraID3();

                id3.Read(openFileDialog.FileName);
                titleTB.Text = id3.Title;
                artistTB.Text = id3.Artist;
                albumTB.Text = id3.Album;
                yearTB.Text = id3.Year.ToString();
                durationTB.Text = id3.Duration.ToString();
                filenameTB.Text = id3.FileName;
                genreTB.Text = id3.Genre;
                sizeTB.Text = id3.Size.ToString();
                trackCountTB.Text = id3.TrackCount.ToString();
                trackNumTB.Text = id3.TrackNum.ToString();
                commentsTB.Text = id3.Comments;
            }
        }
    }
}
